#ifndef __GOFGAME_COMMON_MUTEX_H__
#define __GOFGAME_COMMON_MUTEX_H__

#include <pthread/pthread.h>
namespace gofgame {
	namespace common {
		struct Mutex {
			Mutex() {
				pthread_mutex_init(&this->osMutex, nullptr);
			}
			~Mutex() {
				pthread_mutex_destroy(&this->osMutex);
			}
			operator pthread_mutex_t *() {
				return &this->osMutex;
			}
			pthread_mutex_t osMutex;
		};
	}
}

#endif //__GOFGAME_COMMON_MUTEX_H__